<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>abc</title>
	<script type="text/javascript">

		window.onload = function  () {
			p = document.getElementById('box');
			p.style.color='red';
			pclass = document.getElementsByClassName('box');
			pclass[1].style.color='blue';
			p = document.getElementsByTagName('p');
			p[0].style.fontSize ="20px";
			p = document.getElementsByName('xbs');
			p[1].style.fontSize ="100px";
			xbs.style.color="green";
		}

	</script>

</head>
<body>
	<p id="box" name="xbs" class="box">学并思</p>
	<p name="xbs"  class="box">学并思</p>

	<span id='xbs'>学并思</span>


</body>
</html>